{
	TFile f("out.root");

// 	UShort_t adc_number = 1;
// 	int toffset	= 0;
	int tcenter	= 1880;
	int tdelta	= 500;
	int PM_MIN	= 0;
	int ANZ_PM	= 3;
	int DET_MIN	= 2;
	int ANZ_DET	= 1;
	int DeltaTimerCounter = 33;
	
// // 	TH1F h22("h22", "h22", 500, 0, 500);
// 	TH1F h22("h22", "h22", tdelta, (tcenter-tdelta/2), (tcenter+tdelta/2));
// 
// // 	TH1F h23("h23", "h23", 500, 0, 500);
// 	TH1F h23("h23", "h23", tdelta, (tcenter-tdelta/2), (tcenter+tdelta/2));
// 	h23.SetLineColor(1);
// 	h22.Sumw2(); h23.Sumw2();
// 	Data->Draw("Det1[1] >> h22");
// // 	Data->Draw("Det1[0] >> h23");
// 	
	TH1F * h[DET_MIN+ANZ_DET][PM_MIN+ANZ_PM];
for (int j = DET_MIN; j < DET_MIN + (ANZ_DET); j++) {
	for (int i = PM_MIN; i < PM_MIN + (ANZ_PM); i++) {
		stringstream s;
		s << "h" << j << i;
		cout << "hist name:" << s.str() << endl;
		h[j][i] = new TH1F(s.str().c_str(), s.str().c_str(), tdelta, (tcenter-tdelta/2), (tcenter+tdelta/2));
		h[j][i].Sumw2();
		h[j][i].SetLineColor(i+1-PM_MIN+j-DET_MIN);
// 		
		stringstream s3;
		s3 << "Det" << j << "[" << i << "] >> " << s.str();
		cout << s3.str() << endl;

		stringstream s2;
		s2 << "DeltaTimerCounter == " << DeltaTimerCounter;
		Data->Draw(s3.str().c_str());
// 		Data->Draw(s3.str().c_str(), s2.str().c_str());
	}
}

// // 				h[0]->GetYaxis()->SetRange()
// 	h[DET_MIN][PM_MIN]->GetYaxis()->SetRangeUser(0,100);
			
// 	h23.Draw();
for (int j = DET_MIN; j < DET_MIN + (ANZ_DET); j++) {
	for (int i = PM_MIN; i < PM_MIN + (ANZ_PM); i++) {
		if (i==PM_MIN && j==DET_MIN)
			h[j][i].Draw();
		else
			h[j][i].Draw("same");
	}
}
// 	h22.Draw();
// 	h23.Draw("same");

}

